package com.nhn.ssi.action;

import com.nhn.ssi.bo.TestBo;
import com.nhn.ssi.util.Pager;
import com.nhn.ssi.util.PagerService;
import com.opensymphony.xwork2.ActionSupport;

public class FindAction extends ActionSupport {

	private static final long serialVersionUID = 1L;

	TestBo testBo;
	String currentPage;
	String pagerMethod;
	Pager pager;
	java.util.List<Object> list;

	@SuppressWarnings("unchecked")
	public String execute() throws Exception {
		int totalRows = testBo.getUserListSize();
		PagerService pagerService = new PagerService();
		pager = pagerService.getPager(currentPage, pagerMethod, totalRows);
		this.setCurrentPage("" + pager.getCurrentPage());
		list = testBo.getUserList(pager);
		return "listftl";
	}

	public java.util.List<Object> getList() {
		return list;
	}

	public void setList(java.util.List<Object> list) {
		this.list = list;
	}

	public String getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(String currentPage) {
		this.currentPage = currentPage;
	}

	public TestBo getTestBo() {
		return testBo;
	}

	public void setTestBo(TestBo testBo) {
		this.testBo = testBo;
	}

	public String getPagerMethod() {
		return pagerMethod;
	}

	public void setPagerMethod(String pagerMethod) {
		this.pagerMethod = pagerMethod;
	}

	public Pager getPager() {
		return pager;
	}

	public void setPager(Pager pager) {
		this.pager = pager;
	}
}
